package org.ycx.upms.dao.model;

import java.io.Serializable;
import org.ycx.common.annotation.FormDesc;

@FormDesc(isMidTable=true)
public class SecAttachmentUser implements Serializable {
    /** 附件ID */
    @FormDesc(name="附件ID",maxLength=10,type=1)
    private Integer attId;

    /** 用户ID */
    @FormDesc(name="用户ID",maxLength=10,type=1)
    private Integer userId;

    private static final long serialVersionUID = 1L;

    public Integer getAttId() {
        return attId;
    }

    public void setAttId(Integer attId) {
        this.attId = attId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", attId=").append(attId);
        sb.append(", userId=").append(userId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecAttachmentUser other = (SecAttachmentUser) that;
        return (this.getAttId() == null ? other.getAttId() == null : this.getAttId().equals(other.getAttId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAttId() == null) ? 0 : getAttId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }
}